home *** CD-ROM | disk | FTP | other *** search
Text File | 1996-02-07 | 877 b | 31 lines | [TEXT/ttxt] |
- // TinyHTML.LIB - this is a test
-
- tag(TagName,Attributes,etc/*...*/)
- // Tagname: HTML tag, e.g. "HTML", "BODY", "FORM"
- // Attributes: attributes for tag, if not supplied or "" or NULL then no attributes
- // etc... this and all other strings appended between <Tagname> and </Tagname>. If
- // no etc... then this takes no end tag
- {
- ArgCount = va_arg();
- strcat(ret="<",TagName);
- if ( 1 < ArgCount && Attributes && Attributes[0] )
- strcat(ret," ",Attributes);
- strcat(ret,">");
- if ( 2 < ArgCount ) {
- for ( ArgIndex = 2; ArgIndex < ArgCount; ArgIndex++ ) {
- strcat(ret,va_arg(ArgIndex));
- }
- strcat(ret,"</",TagName,">");
- }
- return ret;
- }
-
- retPrintf(FormatString/*,args*/)
- {
- va_start(VaList,FormatString);
- vsprintf(RetStr,FormatString,VaList);
- va_end(VaList);
- return RetStr;
- }
-
- #define LINEBREAK "<BR>"